<extend name='Layout/page_popup' />
<block name="content">
	{:W('PageHeader/popup',array("回复给:$reply_name"))}
	<form class="well form-horizontal" method='post' id="form_data" name="form_data" enctype="multipart/form-data">
		<input type="hidden" id="ajax" name="ajax" value="0">
		<input type="hidden" id="add_file" name="add_file">
		<input type="hidden" id="receiver_id" name="receiver_id" value="{$reply_id}"/>
		<input type="hidden" id="receiver_name" name="receiver_name" value="{$reply_name}"/>
		<input type="text" style="display:none">
		<div class="form-group">
			<div class="col-xs-12">
				<textarea  class="simple" id="content" name="content" class="col-xs-12" check="require" msg="请输入内容"></textarea>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label" for="name">附件：</label>
			<div class="col-sm-10">
				{:W('FileUpload/add')}
			</div>
		</div>
		<div class="action">

		</div>
	</form>
</block>
<block name="js">
	<script type="text/javascript">
		function sav2e() {
			window.onbeforeunload = null;
			if (check_form("form_data")) {
				sendForm("form_data", "{:U('reply')}");
			}
		}
		function save() {
			window.onbeforeunload = null;
			if (check_form("form_data")) {
				var vars = $("#form_data").serialize();
				sendAjax("{:U('reply')}", vars, function(data) {
					if (data.status) {
						ui_alert(data.info, function() {
							parent.location.reload(true);
							myclose();
						});
					}					
				});
			}
		}		
	</script>
</block>